<template>
    <div class="user_message">
        <div class="row_1">
            <div class="content">
                <div class="icon">图标</div>
                <div v-text="intent.text"></div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    props: {
        intent: Object,
    },
}
</script>

<style scoped>
.user_message {
    width: 100%;
}

.user_message .row_1 {
    width: 100%;
    text-align: right;
}

.user_message .row_1 .content {
    position: relative;
    display: inline-block;
    margin: 2em 2em 1em 1em;
    padding: 1.2em 1em 1.2em 1em;
    min-width: 3em;
    max-width: calc(100% - 5em);
    background-color: #ffffff;
    box-shadow: 0 0 .25em 0 #c6c6c6;
    border-radius: .5em 0 .5em .5em;
    text-align: left;
}

.user_message .row_1 .content .icon {
    position: absolute;
    top: -1.7em;
    right: -1.7em;
    width: 3em;
    height: 3em;
    border-radius: 50%;
    background-color: #dadada;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot_message .row_1 .content .text {
    overflow: hidden;
}
</style>